-- attrib_by_floor
-- created by xinj
-- 根据层数属性提升

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 每回合触发
    trigger = function(who, prop, arg)
        if type(arg) ~= "number" then
            return 0;
        end

        -- 获取层数
        local floor = DungeonM.currentLayer();

        -- 根据属性系数获得加成值
        return arg + math.modf(floor * prop[3] / 10);
    end,

    record = function(target, prop, path)
        return false;
    end
};
